from random import randint
	
def roll(dice):
	
	x = 0
	
	for i in range(dice[0]):
		x += randint(1, dice[1])
	return x